package com.twq.patternmatch.pattern

import com.twq.patternmatch.basic.{Expr, UnOp}

/**
 * Created by tangweiqun on 2017/12/8.
 * 模式的重叠
 */
object PatternOverlaps {
  def main(args: Array[String]): Unit = {

  }

  def simplifyBad(expr: Expr): Expr = expr match {
    case UnOp("-", UnOp("-", e)) => e
    case UnOp(op, e) => UnOp(op, simplifyBad(e))
  }
}
